package com.hp.siminterface.webservice.impl;

import java.util.List;

import com.hp.siminterface.domain.HPUXSoftwareProduct;
import com.hp.siminterface.persistence.HPUXSoftwareProductMapper;
import com.hp.siminterface.webservice.HPUXSoftwareProductService;

public class HPUXSoftwareProductServiceImpl implements
		HPUXSoftwareProductService {
	private HPUXSoftwareProductMapper hpuxSoftwareProductMapper;

	@Override
	public HPUXSoftwareProduct[] getHPUXSoftwareProductInfo() {
		List<HPUXSoftwareProduct> hpuxSoftwareProducts = hpuxSoftwareProductMapper
				.selectHPUXSoftwareProduct();
		HPUXSoftwareProduct[] hpuxSoftwareProductArray = new HPUXSoftwareProduct[hpuxSoftwareProducts
				.size()];
		int i = 0;
		for (HPUXSoftwareProduct hpuxSoftwareProduct : hpuxSoftwareProducts) {
			hpuxSoftwareProductArray[i] = hpuxSoftwareProduct;
			i++;
		}
		return hpuxSoftwareProductArray;
	}

	public void setHpuxSoftwareProductMapper(
			HPUXSoftwareProductMapper hpuxSoftwareProductMapper) {
		this.hpuxSoftwareProductMapper = hpuxSoftwareProductMapper;
	}

}
